using System;
using UnityEngine;

namespace EntityKit.Runtime
{
    /// <summary>
    /// 可序列化的Vector2包装类
    /// </summary>
    [Serializable]
    public class SerializableVector2
    {
        public float x;
        public float y;

        public SerializableVector2(Vector2 vector)
        {
            x = vector.x;
            y = vector.y;
        }

        public Vector2 ToVector2()
        {
            return new Vector2(x, y);
        }
    }
}